<script setup>
 import { onShow, onLoad} from '@dcloudio/uni-app'
 import { ref } from 'vue'
 
//  页面参数
 const queryData = ref({})

//  页面获取
onLoad((option) => {
  // console.log(JSON.parse(option.item));
  queryData.value = JSON.parse(option.item)
  console.log(queryData.value);
})

</script>
<template>
  <div class="detail">
 <view class="header">{{ queryData.name }}</view>
 <view class="content">
    <view class="container">
      <view class="item">
        <view class="left">周数</view>
        <view class="right">{{queryData.rawWeeks}}周</view>
      </view>
      <view class="item">
        <view class="left">节数</view>
        <view class="right">周{{ String(queryData.rawSection).replace("[","").replace("]","") }}</view>
      </view>
      <view class="item">
        <view class="left">地点</view>
        <view class="right">{{queryData.address || "线上学习平台"}} </view>
      </view>
      <view class="item">
        <view class="left">老师</view>
        <view class="right">{{queryData.teacher}}</view>
      </view>
      <view class="item">
        <view class="left">学分</view>
        <view class="right">{{queryData.credit}}</view>
      </view>
      <view class="item">
        <view class="left">类型</view>
        <view class="right">{{queryData.category}}</view>
      </view>
      <view class="item">
        <view class="left">考查</view>
        <view class="right">{{queryData.method}}</view>
      </view>
    </view>
 </view>
  </div>
</template>



<style scoped lang="scss">
.detail {
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: start;
  // margin-left: 38rpx;
  background-color: #efefef;
  .header {
    padding: 12rpx 26rpx 0rpx 0rpx;
    // height: 60rpx;
    padding-bottom: 30rpx;
    width: 100%;
    font-family: 思源黑体;
    font-size: 37rpx;
    font-weight: normal;
    line-height: normal;
    letter-spacing: 0em;
    background-color: #fff;
    padding-left: 38rpx;
    color: #333333;
  }
  .content {
    width: 95%;
    background-color: #fff;
    padding-left: 38rpx;
    border-radius: 0 0 20rpx 20rpx;
    padding-bottom: 40rpx;
    .container  {
      display: flex;
      flex-direction: column;
      .item {
        width: 100%;
        border-top: 1px solid rgba(243, 243, 243, 0.82);;
        display: flex;
        height: 94rpx; 
        align-items: center;
        margin: 10rpx 0;
        .left {
          font-family: 思源黑体;
        font-size: 28rpx;
        font-weight: normal;
        line-height: normal;
        letter-spacing: 0em;

        color: #5DEFE5;
        }
        .right {
          font-family: 思源黑体;
          font-size: 28rpx;
          font-weight: normal;
          line-height: normal;
          letter-spacing: 0em;

          color: #666666;
          margin-left: 52rpx;
        }
      }
    }
  }
}
</style>